#!/bin/bash

v_restapi_options=$1
v_primary_status=`curl -is http://{{ keepalived_ip }}:8008/$v_restapi_options | head -n1 | cut -d" " -f2`
if [ "$v_primary_status" == "200" ]; then
    exit 0
else
    exit 1
fi